package com.karry.yl.domain.financial;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.karry.commons.base.SuperEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 收款单
 */
@TableName("receipt")
public class Receipt extends SuperEntity {
    public static final int STATUS_ZC = 1; //待支付
    public static final int STATUS_YZF = 3; //待支付
    public static final int PM_ZX = 1; //在线支付
    public static final int PM_SK = 4; //刷卡付
    public static final int PM_XJ = 5; //现金付
    public static final int TYPE_FW = 1; //服务收费单
    public static final int TYPE_TC = 2; //服务收费单
    public static final int TYPE_QT = 3; //服务收费单

    private Long orgId; //所属机构
    private String orgName; // 机构名称
    private Long elderlyId; // 所属老人
    private String elderlyName; //老人姓名
    private String elderlyCode; //老人编号

    private String code; //账单号
    private String name; //账单名称
    private BigDecimal amount; // 总计
    private BigDecimal realAmount; // 实际收金额

    private Integer paymentMethod;  //付款方式 1：微信支付 2：支付宝 3：银联 4：刷卡支付 5：现金支付

    private Integer status;  // 1：待支付 3:已支付 4：逾期 5：作废

    private Integer type;  // 1:服务收费单 2：套餐收费单  3:其它收费单

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime; // 缴费最后截止日期，超过此时间缴费算逾期

    private Date paymentTime;  //缴费时间

    private Long userId;  // 添加服务的用户Id

    @TableField(exist = false)  //表示该属性不为数据库表字段，但又是必须使用的。
    private List<ReceiptItems> receiptItemsList;

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public Long getElderlyId() {
        return elderlyId;
    }

    public void setElderlyId(Long elderlyId) {
        this.elderlyId = elderlyId;
    }

    public String getElderlyName() {
        return elderlyName;
    }

    public void setElderlyName(String elderlyName) {
        this.elderlyName = elderlyName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(Integer paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getElderlyCode() {
        return elderlyCode;
    }

    public void setElderlyCode(String elderlyCode) {
        this.elderlyCode = elderlyCode;
    }

    public Date getPaymentTime() {
        return paymentTime;
    }

    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    public BigDecimal getRealAmount() {
        return realAmount;
    }

    public void setRealAmount(BigDecimal realAmount) {
        this.realAmount = realAmount;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<ReceiptItems> getReceiptItemsList() {
        return receiptItemsList;
    }

    public void setReceiptItemsList(List<ReceiptItems> receiptItemsList) {
        this.receiptItemsList = receiptItemsList;
    }
}
